package com.example.usermanagement.service;

import com.example.usermanagement.model.User;
import jakarta.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.List;

public interface ExcelExportService {

    /**
     * 导出用户列表到Excel文件
     * @param users 用户列表
     * @param response HTTP响应
     * @throws IOException IO异常
     */
    void exportUsersToExcel(List<User> users, HttpServletResponse response) throws IOException;

    /**
     * 根据条件导出符合条件的用户到Excel文件
     * @param searchQuery 搜索关键词
     * @param roleFilter 角色筛选
     * @param response HTTP响应
     * @throws IOException IO异常
     */
    void exportFilteredUsersToExcel(String searchQuery, String roleFilter, HttpServletResponse response) throws IOException;
}